<template>
  <div class="app-container calendar-list-container">
    <el-tabs type="card" v-model="activeTab">
      <!-- 新产品报价单  -->
      <el-tab-pane label="新产品" name="newQuotation">
        <new-quotation ref="newQuotation"></new-quotation>
      </el-tab-pane>
      <!-- 老产品报价单 -->
      <el-tab-pane label="老产品" name="oldQuotation">
        <old-quotation ref="oldQuotation"></old-quotation>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
  import { mapGetters } from 'vuex';
  import EditRefresh from '@/components/Mixin/editRefresh.js';

  export default {
    components: {
      'new-quotation': () => import('./components/newQuotation'),
      'old-quotation': () => import('./components/oldQuotation')
    },
    mixins: [EditRefresh],
    data() {
      return {
        activeTab: 'newQuotation'
      }
    },
    computed: {
      ...mapGetters([
        'elements'
      ])
    },
    methods: {
      refresh() {
        this.activeTab = 'newQuotation'
        this.$refs.category && this.$refs.category.refresh && this.$refs.category.refresh()
        this.$refs.product && this.$refs.product.refresh && this.$refs.product.refresh()
        this.$refs.doc && this.$refs.doc.refresh && this.$refs.doc.refresh()
        this.$refs.pcc && this.$refs.pcc.refresh && this.$refs.pcc.refresh()
      }
    }
  }
</script>
